A controller for machine tool is configured with a CPU, an ROM, an RAM, a hard disk, an input device, a screen display device and other components, and various types of software are stored in the ROM and the hard disk. As such software, there can be mentioned, for example, software for machining simulation as well as software for system control, and as a controller including software for machining simulation, conventionally, the controller disclosed in the Japanese Unexamined Patent Application Publication No. 2006-85485 is known, for example.
In this controller, the hardware, such as a CPU, an ROM, an RAM and a hard disk, and the software function as a main control section, a machining program memory in which an NC program is stored, a model memory in which three-dimensional model data of the tool, the workpiece, the tool rest, the workpiece spindle etc. are stored, a program-analysis control section for analyzing the NC program stored in the machining program memory, a simulation control section for calculating a tool moving path on the basis of the program analysis by the program-analysis control section, a modeling control section for calculating model data of the tool, the workpiece, the tool rest and the workpiece spindle which are being moved relatively along the tool moving path on the basis of the result of the calculation by the simulation control section and the model data stored in the model memory, a model-rendering control section for generating image data on the basis of the model data calculated by the modeling control section, and the like. The image data generated by the model-rendering control section is displayed on the screen display device under the display control by the main control section.
An operator checks the movement state of the tool and the machining state through the displayed images of the tool and the workpiece which are being moved according to the NC program, thereby checking whether there is any error in the NC program.